'''
Author: your name
Date: 2020-11-05 16:37:27
LastEditTime: 2020-11-05 16:48:27
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \python-study\djangoS\app01\app01\views.py
'''
from django.shortcuts import render,HttpResponse
from Models.models import Book

class BookView():
    def add_book(request):
        book = Book(title="菜鸟教程",price=300,publish="菜鸟出版社",pub_date="2008-8-8") 
        book.save()
        return HttpResponse("<p>数据添加成功！</p>")